<template>
	<div class="login">
		<div class="contain">
			<div class="title">这是登陆的界面</div>
			<form action="" ref='loginForm'>
				<button class="btn" @click="login">提交</button>
			</form>
		</div>
	</div>
</template>

<script>
	export default{
		methods:{
			//登陆表单的预验证和发起登陆请求
			login(){
				window.sessionStorage.setItem('token','已经登陆')
				//编程式导航，跳转到这里
				this.$router.push('/home')
			}
		}
	}
</script>

<style lang="stylus" scoped>
	.contain
		width 200px
		margin 100px auto
</style>
